package com.jzcn.common.enums;

import lombok.Getter;

public enum BaseStatusEnum {

    STOP("停用", 0),

    START("启用", 1);


    @Getter
    private String content;

    @Getter
    private Integer value;

    BaseStatusEnum(String content, Integer value) {
        this.content = content;
        this.value = value;
    }

    public static BaseStatusEnum getByValue(Integer value) {
        BaseStatusEnum[] types = BaseStatusEnum.values();
        for (BaseStatusEnum type : types) {
            if (type.getValue().equals(value)) {
                return type;
            }
        }
        return null;
    }
}
